INCL =
SHELL = /bin/sh
OPTN = -g


all: superalign simplematch

%.o:	%.c
		gcc $(INCL) ${OPTN} -o $@ -c $<

simplematch: arrays.o matchup.o sort.o error.o simplealign.c simplematch.c superalign.h
		gcc -g -o simplematch simplematch.c arrays.o matchup.o sort.o error.o simplealign.o mt19937ar.o -lm

superalign: arrays.o matchup.o sort.o error.o nrutil.o simplealign.o mt19937ar.o superalign.c
		gcc -g -o superalign superalign.c arrays.o matchup.o sort.o error.o nrutil.o simplealign.o mt19937ar.o -lm

install:
		/bin/cp superalign ../../bin/superalign
		/bin/cp simplematch ../../bin/simplematch

clean: 
		rm arrays.o matchup.o sort.o error.o nrutil.o simplealign.o mt19937ar.o
		rm simplematch superalign

distrmatch:
		tar -cvf simplematch.tar simplematch.c arrays.c matchup.c sort.c error.c nr.h arrays.h error.h makefile mt19937ar.c cholsl.c choldc.c nrutil.c simplealign.c superalign.h superalign.c
